Integrand size = 21, antiderivative size = 177 \[ \int \frac {\cot ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\frac {x}{a}-\frac {2 b^5 \text {arctanh}\left (\frac {\sqrt {a^2-b^2} \tan \left (\frac {1}{2} (c+d x)\right )}{a+b}\right )}{a \left (a^2-b^2\right )^{5/2} d}+\frac {a \left (a^2-2 b^2\right ) \cot (c+d x)}{\left (a^2-b^2\right )^2 d}-\frac {a \cot ^3(c+d x)}{3 \left (a^2-b^2\right ) d}-\frac {b \left (a^2-2 b^2\right ) \csc (c+d x)}{\left (a^2-b^2\right )^2 d}+\frac {b \csc ^3(c+d x)}{3 \left (a^2-b^2\right ) d} \]
x/a-2*b^5*arctanh((a^2-b^2)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b))/a/(a^2-b^2)^(5 /2)/d+a*(a^2-2*b^2)*cot(d*x+c)/(a^2-b^2)^2/d-1/3*a*cot(d*x+c)^3/(a^2-b^2)/ d-b*(a^2-2*b^2)*csc(d*x+c)/(a^2-b^2)^2/d+1/3*b*csc(d*x+c)^3/(a^2-b^2)/d
Leaf count is larger than twice the leaf count of optimal. \(416\) vs. \(2(177)=354\).
Time = 6.44 (sec) , antiderivative size = 416, normalized size of antiderivative = 2.35 \[ \int \frac {\cot ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\frac {(c+d x) (b+a \cos (c+d x)) \sec (c+d x)}{a d (a+b \sec (c+d x))}+\frac {2 b^5 \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right ) (b+a \cos (c+d x)) \sec (c+d x)}{a \sqrt {a^2-b^2} \left (-a^2+b^2\right )^2 d (a+b \sec (c+d x))}+\frac {\left (8 a \cos \left (\frac {1}{2} (c+d x)\right )+11 b \cos \left (\frac {1}{2} (c+d x)\right )\right ) (b+a \cos (c+d x)) \csc \left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)}{12 (a+b)^2 d (a+b \sec (c+d x))}-\frac {(b+a \cos (c+d x)) \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)}{24 (a+b) d (a+b \sec (c+d x))}+\frac {(b+a \cos (c+d x)) \sec \left (\frac {1}{2} (c+d x)\right ) \sec (c+d x) \left (-8 a \sin \left (\frac {1}{2} (c+d x)\right )+11 b \sin \left (\frac {1}{2} (c+d x)\right )\right )}{12 (-a+b)^2 d (a+b \sec (c+d x))}-\frac {(b+a \cos (c+d x)) \sec ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x) \tan \left (\frac {1}{2} (c+d x)\right )}{24 (-a+b) d (a+b \sec (c+d x))} \]
((c + d*x)*(b + a*Cos[c + d*x])*Sec[c + d*x])/(a*d*(a + b*Sec[c + d*x])) + (2*b^5*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]]*(b + a*Cos[c + d*x])*Sec[c + d*x])/(a*Sqrt[a^2 - b^2]*(-a^2 + b^2)^2*d*(a + b*Sec[c + d *x])) + ((8*a*Cos[(c + d*x)/2] + 11*b*Cos[(c + d*x)/2])*(b + a*Cos[c + d*x ])*Csc[(c + d*x)/2]*Sec[c + d*x])/(12*(a + b)^2*d*(a + b*Sec[c + d*x])) - ((b + a*Cos[c + d*x])*Cot[(c + d*x)/2]*Csc[(c + d*x)/2]^2*Sec[c + d*x])/(2 4*(a + b)*d*(a + b*Sec[c + d*x])) + ((b + a*Cos[c + d*x])*Sec[(c + d*x)/2] *Sec[c + d*x]*(-8*a*Sin[(c + d*x)/2] + 11*b*Sin[(c + d*x)/2]))/(12*(-a + b )^2*d*(a + b*Sec[c + d*x])) - ((b + a*Cos[c + d*x])*Sec[(c + d*x)/2]^2*Sec [c + d*x]*Tan[(c + d*x)/2])/(24*(-a + b)*d*(a + b*Sec[c + d*x]))
Time = 1.34 (sec) , antiderivative size = 222, normalized size of antiderivative = 1.25, number of steps used = 26, number of rules used = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.190, Rules used = {3042, 4386, 3042, 25, 3381, 25, 3042, 25, 3086, 2009, 3381, 25, 3042, 25, 3086, 24, 3214, 3042, 3138, 221, 3954, 24, 3042, 3954, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot ^4(c+d x)}{a+b \sec (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\cot \left (c+d x+\frac {\pi }{2}\right )^4 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )}dx\) |
\(\Big \downarrow \) 4386 |
\(\displaystyle \int \frac {\cos (c+d x) \cot ^4(c+d x)}{a \cos (c+d x)+b}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\sin \left (c+d x-\frac {\pi }{2}\right )^5}{\cos \left (c+d x-\frac {\pi }{2}\right )^4 \left (b-a \sin \left (c+d x-\frac {\pi }{2}\right )\right )}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\sin \left (\frac {1}{2} (2 c-\pi )+d x\right )^5}{\cos \left (\frac {1}{2} (2 c-\pi )+d x\right )^4 \left (b-a \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )\right )}dx\) |
\(\Big \downarrow \) 3381 |
\(\displaystyle \frac {a \int \cot ^4(c+d x)dx}{a^2-b^2}-\frac {b^2 \int -\frac {\cos (c+d x) \cot ^2(c+d x)}{b+a \cos (c+d x)}dx}{a^2-b^2}+\frac {b \int -\cot ^3(c+d x) \csc (c+d x)dx}{a^2-b^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {a \int \cot ^4(c+d x)dx}{a^2-b^2}+\frac {b^2 \int \frac {\cos (c+d x) \cot ^2(c+d x)}{b+a \cos (c+d x)}dx}{a^2-b^2}-\frac {b \int \cot ^3(c+d x) \csc (c+d x)dx}{a^2-b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}+\frac {b^2 \int -\frac {\sin \left (c+d x-\frac {\pi }{2}\right )^3}{\cos \left (c+d x-\frac {\pi }{2}\right )^2 \left (b-a \sin \left (c+d x-\frac {\pi }{2}\right )\right )}dx}{a^2-b^2}-\frac {b \int -\sec \left (c+d x-\frac {\pi }{2}\right ) \tan \left (c+d x-\frac {\pi }{2}\right )^3dx}{a^2-b^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}-\frac {b^2 \int \frac {\sin \left (\frac {1}{2} (2 c-\pi )+d x\right )^3}{\cos \left (\frac {1}{2} (2 c-\pi )+d x\right )^2 \left (b-a \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )\right )}dx}{a^2-b^2}+\frac {b \int \sec \left (\frac {1}{2} (2 c-\pi )+d x\right ) \tan \left (\frac {1}{2} (2 c-\pi )+d x\right )^3dx}{a^2-b^2}\) |
\(\Big \downarrow \) 3086 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}+\frac {b \int \left (\csc ^2(c+d x)-1\right )d\csc (c+d x)}{d \left (a^2-b^2\right )}-\frac {b^2 \int \frac {\sin \left (\frac {1}{2} (2 c-\pi )+d x\right )^3}{\cos \left (\frac {1}{2} (2 c-\pi )+d x\right )^2 \left (b-a \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )\right )}dx}{a^2-b^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}-\frac {b^2 \int \frac {\sin \left (\frac {1}{2} (2 c-\pi )+d x\right )^3}{\cos \left (\frac {1}{2} (2 c-\pi )+d x\right )^2 \left (b-a \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )\right )}dx}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3381 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}-\frac {b^2 \left (\frac {b^2 \int -\frac {\cos (c+d x)}{b+a \cos (c+d x)}dx}{a^2-b^2}-\frac {a \int \cot ^2(c+d x)dx}{a^2-b^2}-\frac {b \int -\cot (c+d x) \csc (c+d x)dx}{a^2-b^2}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}-\frac {b^2 \left (-\frac {b^2 \int \frac {\cos (c+d x)}{b+a \cos (c+d x)}dx}{a^2-b^2}-\frac {a \int \cot ^2(c+d x)dx}{a^2-b^2}+\frac {b \int \cot (c+d x) \csc (c+d x)dx}{a^2-b^2}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}-\frac {b^2 \left (-\frac {b^2 \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )}{b+a \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2-b^2}-\frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^2dx}{a^2-b^2}+\frac {b \int -\sec \left (c+d x-\frac {\pi }{2}\right ) \tan \left (c+d x-\frac {\pi }{2}\right )dx}{a^2-b^2}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}-\frac {b^2 \left (-\frac {b^2 \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )}{b+a \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2-b^2}-\frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^2dx}{a^2-b^2}-\frac {b \int \sec \left (\frac {1}{2} (2 c-\pi )+d x\right ) \tan \left (\frac {1}{2} (2 c-\pi )+d x\right )dx}{a^2-b^2}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3086 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}-\frac {b^2 \left (-\frac {b^2 \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )}{b+a \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2-b^2}-\frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^2dx}{a^2-b^2}-\frac {b \int 1d\csc (c+d x)}{d \left (a^2-b^2\right )}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}-\frac {b^2 \left (-\frac {b^2 \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )}{b+a \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2-b^2}-\frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^2dx}{a^2-b^2}-\frac {b \csc (c+d x)}{d \left (a^2-b^2\right )}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}-\frac {b^2 \left (-\frac {b^2 \left (\frac {x}{a}-\frac {b \int \frac {1}{b+a \cos (c+d x)}dx}{a}\right )}{a^2-b^2}-\frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^2dx}{a^2-b^2}-\frac {b \csc (c+d x)}{d \left (a^2-b^2\right )}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}-\frac {b^2 \left (-\frac {b^2 \left (\frac {x}{a}-\frac {b \int \frac {1}{b+a \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a}\right )}{a^2-b^2}-\frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^2dx}{a^2-b^2}-\frac {b \csc (c+d x)}{d \left (a^2-b^2\right )}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}-\frac {b^2 \left (-\frac {b^2 \left (\frac {x}{a}-\frac {2 b \int \frac {1}{-\left ((a-b) \tan ^2\left (\frac {1}{2} (c+d x)\right )\right )+a+b}d\tan \left (\frac {1}{2} (c+d x)\right )}{a d}\right )}{a^2-b^2}-\frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^2dx}{a^2-b^2}-\frac {b \csc (c+d x)}{d \left (a^2-b^2\right )}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle -\frac {b^2 \left (-\frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^2dx}{a^2-b^2}-\frac {b^2 \left (\frac {x}{a}-\frac {2 b \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}\right )}{a^2-b^2}-\frac {b \csc (c+d x)}{d \left (a^2-b^2\right )}\right )}{a^2-b^2}+\frac {a \int \tan \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle -\frac {b^2 \left (-\frac {a \left (-\int 1dx-\frac {\cot (c+d x)}{d}\right )}{a^2-b^2}-\frac {b^2 \left (\frac {x}{a}-\frac {2 b \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}\right )}{a^2-b^2}-\frac {b \csc (c+d x)}{d \left (a^2-b^2\right )}\right )}{a^2-b^2}+\frac {a \left (-\int \cot ^2(c+d x)dx-\frac {\cot ^3(c+d x)}{3 d}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {a \left (-\int \cot ^2(c+d x)dx-\frac {\cot ^3(c+d x)}{3 d}\right )}{a^2-b^2}-\frac {b^2 \left (-\frac {b^2 \left (\frac {x}{a}-\frac {2 b \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}\right )}{a^2-b^2}-\frac {a \left (-\frac {\cot (c+d x)}{d}-x\right )}{a^2-b^2}-\frac {b \csc (c+d x)}{d \left (a^2-b^2\right )}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \left (-\int \tan \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {\cot ^3(c+d x)}{3 d}\right )}{a^2-b^2}-\frac {b^2 \left (-\frac {b^2 \left (\frac {x}{a}-\frac {2 b \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}\right )}{a^2-b^2}-\frac {a \left (-\frac {\cot (c+d x)}{d}-x\right )}{a^2-b^2}-\frac {b \csc (c+d x)}{d \left (a^2-b^2\right )}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle \frac {a \left (\int 1dx-\frac {\cot ^3(c+d x)}{3 d}+\frac {\cot (c+d x)}{d}\right )}{a^2-b^2}-\frac {b^2 \left (-\frac {b^2 \left (\frac {x}{a}-\frac {2 b \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}\right )}{a^2-b^2}-\frac {a \left (-\frac {\cot (c+d x)}{d}-x\right )}{a^2-b^2}-\frac {b \csc (c+d x)}{d \left (a^2-b^2\right )}\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle -\frac {b^2 \left (-\frac {b^2 \left (\frac {x}{a}-\frac {2 b \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}\right )}{a^2-b^2}-\frac {a \left (-\frac {\cot (c+d x)}{d}-x\right )}{a^2-b^2}-\frac {b \csc (c+d x)}{d \left (a^2-b^2\right )}\right )}{a^2-b^2}+\frac {a \left (-\frac {\cot ^3(c+d x)}{3 d}+\frac {\cot (c+d x)}{d}+x\right )}{a^2-b^2}+\frac {b \left (\frac {1}{3} \csc ^3(c+d x)-\csc (c+d x)\right )}{d \left (a^2-b^2\right )}\) |
(a*(x + Cot[c + d*x]/d - Cot[c + d*x]^3/(3*d)))/(a^2 - b^2) - (b^2*(-((b^2 *(x/a - (2*b*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(a*Sqrt[ a - b]*Sqrt[a + b]*d)))/(a^2 - b^2)) - (a*(-x - Cot[c + d*x]/d))/(a^2 - b^ 2) - (b*Csc[c + d*x])/((a^2 - b^2)*d)))/(a^2 - b^2) + (b*(-Csc[c + d*x] + Csc[c + d*x]^3/3))/((a^2 - b^2)*d)
3.3.98.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( n_.), x_Symbol] :> Simp[a/f Subst[Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2 ), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2 ] && !(IntegerQ[m/2] && LtQ[0, m, n + 1])
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^( n_))/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a*(d^2/(a^2 - b^2)) Int[(g*Cos[e + f*x])^p*(d*Sin[e + f*x])^(n - 2), x], x] + (-Simp[ b*(d/(a^2 - b^2)) Int[(g*Cos[e + f*x])^p*(d*Sin[e + f*x])^(n - 1), x], x] - Simp[a^2*(d^2/(g^2*(a^2 - b^2))) Int[(g*Cos[e + f*x])^(p + 2)*((d*Sin[ e + f*x])^(n - 2)/(a + b*Sin[e + f*x])), x], x]) /; FreeQ[{a, b, d, e, f, g }, x] && NeQ[a^2 - b^2, 0] && IntegersQ[2*n, 2*p] && LtQ[p, -1] && GtQ[n, 1 ]
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d *x])^(n - 1)/(d*(n - 1))), x] - Simp[b^2 Int[(b*Tan[c + d*x])^(n - 2), x] , x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _), x_Symbol] :> Int[Cos[c + d*x]^m*((b + a*Sin[c + d*x])^n/Sin[c + d*x]^(m + n)), x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && IntegerQ[n] && IntegerQ[m] && (IntegerQ[m/2] || LeQ[m, 1])
Time = 0.90 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.04
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a}{3}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} b}{3}-5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a +7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b}{8 \left (a -b \right )^{2}}+\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {1}{24 \left (a +b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {-5 a -7 b}{8 \left (a +b \right )^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {2 b^{5} \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a +b \right )^{2} \left (a -b \right )^{2} a \sqrt {\left (a -b \right ) \left (a +b \right )}}}{d}\) | \(184\) |
default | \(\frac {\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a}{3}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} b}{3}-5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a +7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b}{8 \left (a -b \right )^{2}}+\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {1}{24 \left (a +b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {-5 a -7 b}{8 \left (a +b \right )^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {2 b^{5} \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a +b \right )^{2} \left (a -b \right )^{2} a \sqrt {\left (a -b \right ) \left (a +b \right )}}}{d}\) | \(184\) |
risch | \(\frac {x}{a}-\frac {2 i \left (3 a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}-6 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-6 a^{3} {\mathrm e}^{4 i \left (d x +c \right )}+9 a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-2 a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}+8 b^{3} {\mathrm e}^{3 i \left (d x +c \right )}+6 a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-12 a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+3 a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}-6 b^{3} {\mathrm e}^{i \left (d x +c \right )}-4 a^{3}+7 a \,b^{2}\right )}{3 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3} d}+\frac {b^{5} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2} d a}-\frac {b^{5} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+b \sqrt {a^{2}-b^{2}}}{\sqrt {a^{2}-b^{2}}\, a}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2} d a}\) | \(371\) |
1/d*(1/8/(a-b)^2*(1/3*tan(1/2*d*x+1/2*c)^3*a-1/3*tan(1/2*d*x+1/2*c)^3*b-5* tan(1/2*d*x+1/2*c)*a+7*tan(1/2*d*x+1/2*c)*b)+2/a*arctan(tan(1/2*d*x+1/2*c) )-1/24/(a+b)/tan(1/2*d*x+1/2*c)^3-1/8/(a+b)^2*(-5*a-7*b)/tan(1/2*d*x+1/2*c )-2/(a+b)^2/(a-b)^2*b^5/a/((a-b)*(a+b))^(1/2)*arctanh((a-b)*tan(1/2*d*x+1/ 2*c)/((a-b)*(a+b))^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 342 vs. \(2 (168) = 336\).
Time = 0.31 (sec) , antiderivative size = 742, normalized size of antiderivative = 4.19 \[ \int \frac {\cot ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\left [\frac {4 \, a^{5} b - 14 \, a^{3} b^{3} + 10 \, a b^{5} + 2 \, {\left (4 \, a^{6} - 11 \, a^{4} b^{2} + 7 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (b^{5} \cos \left (d x + c\right )^{2} - b^{5}\right )} \sqrt {a^{2} - b^{2}} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + b^{2}}\right ) \sin \left (d x + c\right ) - 6 \, {\left (a^{5} b - 3 \, a^{3} b^{3} + 2 \, a b^{5}\right )} \cos \left (d x + c\right )^{2} - 6 \, {\left (a^{6} - 3 \, a^{4} b^{2} + 2 \, a^{2} b^{4}\right )} \cos \left (d x + c\right ) + 6 \, {\left ({\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} d x \cos \left (d x + c\right )^{2} - {\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} d x\right )} \sin \left (d x + c\right )}{6 \, {\left ({\left (a^{7} - 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} - a b^{6}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{7} - 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} - a b^{6}\right )} d\right )} \sin \left (d x + c\right )}, \frac {2 \, a^{5} b - 7 \, a^{3} b^{3} + 5 \, a b^{5} + {\left (4 \, a^{6} - 11 \, a^{4} b^{2} + 7 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (b^{5} \cos \left (d x + c\right )^{2} - b^{5}\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) - 3 \, {\left (a^{5} b - 3 \, a^{3} b^{3} + 2 \, a b^{5}\right )} \cos \left (d x + c\right )^{2} - 3 \, {\left (a^{6} - 3 \, a^{4} b^{2} + 2 \, a^{2} b^{4}\right )} \cos \left (d x + c\right ) + 3 \, {\left ({\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} d x \cos \left (d x + c\right )^{2} - {\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} d x\right )} \sin \left (d x + c\right )}{3 \, {\left ({\left (a^{7} - 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} - a b^{6}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{7} - 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} - a b^{6}\right )} d\right )} \sin \left (d x + c\right )}\right ] \]
[1/6*(4*a^5*b - 14*a^3*b^3 + 10*a*b^5 + 2*(4*a^6 - 11*a^4*b^2 + 7*a^2*b^4) *cos(d*x + c)^3 + 3*(b^5*cos(d*x + c)^2 - b^5)*sqrt(a^2 - b^2)*log((2*a*b* cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 - 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + b^2))*sin(d*x + c) - 6*(a^5*b - 3*a^3*b^3 + 2*a*b^5)*cos(d*x + c)^ 2 - 6*(a^6 - 3*a^4*b^2 + 2*a^2*b^4)*cos(d*x + c) + 6*((a^6 - 3*a^4*b^2 + 3 *a^2*b^4 - b^6)*d*x*cos(d*x + c)^2 - (a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*d *x)*sin(d*x + c))/(((a^7 - 3*a^5*b^2 + 3*a^3*b^4 - a*b^6)*d*cos(d*x + c)^2 - (a^7 - 3*a^5*b^2 + 3*a^3*b^4 - a*b^6)*d)*sin(d*x + c)), 1/3*(2*a^5*b - 7*a^3*b^3 + 5*a*b^5 + (4*a^6 - 11*a^4*b^2 + 7*a^2*b^4)*cos(d*x + c)^3 - 3* (b^5*cos(d*x + c)^2 - b^5)*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*co s(d*x + c) + a)/((a^2 - b^2)*sin(d*x + c)))*sin(d*x + c) - 3*(a^5*b - 3*a^ 3*b^3 + 2*a*b^5)*cos(d*x + c)^2 - 3*(a^6 - 3*a^4*b^2 + 2*a^2*b^4)*cos(d*x + c) + 3*((a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*d*x*cos(d*x + c)^2 - (a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*d*x)*sin(d*x + c))/(((a^7 - 3*a^5*b^2 + 3*a^3 *b^4 - a*b^6)*d*cos(d*x + c)^2 - (a^7 - 3*a^5*b^2 + 3*a^3*b^4 - a*b^6)*d)* sin(d*x + c))]
\[ \int \frac {\cot ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\int \frac {\cot ^{4}{\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \]
Exception generated. \[ \int \frac {\cot ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 1073 vs. \(2 (168) = 336\).
Time = 0.48 (sec) , antiderivative size = 1073, normalized size of antiderivative = 6.06 \[ \int \frac {\cot ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\text {Too large to display} \]
-1/24*(24*((a^4 - a^3*b - 2*a^2*b^2 + 2*a*b^3 + b^4)*sqrt(-a^2 + b^2)*abs( a^5 - 2*a^3*b^2 + a*b^4)*abs(-a + b) - (a^9 - a^8*b - 4*a^7*b^2 + 4*a^6*b^ 3 + 6*a^5*b^4 - 7*a^4*b^5 - 4*a^3*b^6 + 6*a^2*b^7 + a*b^8 - 2*b^9)*sqrt(-a ^2 + b^2)*abs(-a + b))*(pi*floor(1/2*(d*x + c)/pi + 1/2) + arctan(tan(1/2* d*x + 1/2*c)/sqrt(-(a^4*b - 2*a^2*b^3 + b^5 + sqrt((a^5 + a^4*b - 2*a^3*b^ 2 - 2*a^2*b^3 + a*b^4 + b^5)*(a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^5) + (a^4*b - 2*a^2*b^3 + b^5)^2))/(a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^ 3 + a*b^4 - b^5))))/((a^5 - 2*a^3*b^2 + a*b^4)^2*(a^2 - 2*a*b + b^2) + (a^ 6*b - 2*a^5*b^2 - a^4*b^3 + 4*a^3*b^4 - a^2*b^5 - 2*a*b^6 + b^7)*abs(a^5 - 2*a^3*b^2 + a*b^4)) + 24*(a^9 - a^8*b - 4*a^7*b^2 + 4*a^6*b^3 + 6*a^5*b^4 - 7*a^4*b^5 - 4*a^3*b^6 + 6*a^2*b^7 + a*b^8 - 2*b^9 + a^4*abs(a^5 - 2*a^3 *b^2 + a*b^4) - a^3*b*abs(a^5 - 2*a^3*b^2 + a*b^4) - 2*a^2*b^2*abs(a^5 - 2 *a^3*b^2 + a*b^4) + 2*a*b^3*abs(a^5 - 2*a^3*b^2 + a*b^4) + b^4*abs(a^5 - 2 *a^3*b^2 + a*b^4))*(pi*floor(1/2*(d*x + c)/pi + 1/2) + arctan(tan(1/2*d*x + 1/2*c)/sqrt(-(a^4*b - 2*a^2*b^3 + b^5 - sqrt((a^5 + a^4*b - 2*a^3*b^2 - 2*a^2*b^3 + a*b^4 + b^5)*(a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^ 5) + (a^4*b - 2*a^2*b^3 + b^5)^2))/(a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^5))))/(a^4*b*abs(a^5 - 2*a^3*b^2 + a*b^4) - 2*a^2*b^3*abs(a^5 - 2*a^3*b^2 + a*b^4) + b^5*abs(a^5 - 2*a^3*b^2 + a*b^4) - (a^5 - 2*a^3*b^2 + a*b^4)^2) - (a^2*tan(1/2*d*x + 1/2*c)^3 - 2*a*b*tan(1/2*d*x + 1/2*c)^3...
Time = 23.38 (sec) , antiderivative size = 3859, normalized size of antiderivative = 21.80 \[ \int \frac {\cot ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\text {Too large to display} \]
(a^10*((cos(3*c + 3*d*x)*4i)/3 - sin(c + d*x)*atan(sin(c/2 + (d*x)/2)/cos( c/2 + (d*x)/2))*6i + atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*sin(3*c + 3*d*x)*2i) + a*((b^9*8i)/3 - b^9*cos(2*c + 2*d*x)*4i) - a^7*((b^3*14i)/3 - b^3*cos(2*c + 2*d*x)*10i) + a^5*(b^5*10i - b^5*cos(2*c + 2*d*x)*18i) - a ^3*((b^7*26i)/3 - b^7*cos(2*c + 2*d*x)*14i) + a^9*((b*2i)/3 - b*cos(2*c + 2*d*x)*2i) + a^8*(b^2*cos(c + d*x)*1i - (b^2*cos(3*c + 3*d*x)*19i)/3 + b^2 *sin(c + d*x)*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*30i - b^2*atan(s in(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*sin(3*c + 3*d*x)*10i) - a^2*(b^8*cos (c + d*x)*1i - (b^8*cos(3*c + 3*d*x)*7i)/3 + b^8*sin(c + d*x)*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*30i - b^8*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*sin(3*c + 3*d*x)*10i) - a^6*(b^4*cos(c + d*x)*3i - b^4*cos(3*c + 3*d*x)*11i + b^4*sin(c + d*x)*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2 ))*60i - b^4*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*sin(3*c + 3*d*x)* 20i) + a^4*(b^6*cos(c + d*x)*3i - (b^6*cos(3*c + 3*d*x)*25i)/3 + b^6*sin(c + d*x)*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*60i - b^6*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*sin(3*c + 3*d*x)*20i) + b^10*sin(c + d*x)* atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*6i - b^10*atan(sin(c/2 + (d*x) /2)/cos(c/2 + (d*x)/2))*sin(3*c + 3*d*x)*2i + b^5*atanh((2*b^11*sin(c/2 + (d*x)/2)*(a^10 - b^10 + 5*a^2*b^8 - 10*a^4*b^6 + 10*a^6*b^4 - 5*a^8*b^2)^( 3/2) - a^21*sin(c/2 + (d*x)/2)*(a^10 - b^10 + 5*a^2*b^8 - 10*a^4*b^6 + ...